home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jun 89 / V0060-R⁄W TDocument Files-Jun89 < prev    next >
Encoding:
Text File  |  1989-06-26  |  1.2 KB  |  45 lines  |  [TEXT/GEOL]

  1. Item    2606148                         21-June-89        08:55
  2.  
  3. From:   D0420                           Satori SW, Hugh Rogovy, PRT
  4.  
  5. To:     X0357                           Contractrol LTD T/A Microspot,R.C.
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    R/W TDocument Files
  10.  
  11. Alastair,
  12.  
  13. Since nobody answered your first link, I'll give it a shot...
  14.  
  15. If you want Read/Write access to a TDocument file data fork you need to do both
  16. of the following:
  17.  
  18. First in IDocument you should pass kDataOpen(TRUE) and kUsesDataFork(TRUE) for
  19. the usesDataFork and keepsDataOpen parameters respectively.
  20.  
  21. Second, after calling IDocument you need to set the fDataPerm field to
  22. fsRdWrPerm.
  23.  
  24. Here is a short fragment...
  25.  
  26.  
  27.  
  28.  
  29.    NEW(aDoc);FailNil(aDoc);
  30.    aDoc.IDocument(kFileType, kSignature, kUsesDataFork,NOT kUsesRsrcFork,
  31.                   kDataOpen,NOT kRsrcOpen);   {use and keep open the data fork}
  32.    aDoc.   fDataPerm := fsRdWrPerm; {give the file R/W permission}
  33.  
  34.  
  35.  
  36.  
  37. You can use the same concept as far as the resource fork goes, also...
  38.  
  39. I hope this helps....
  40.  
  41.  
  42.                                     Chris Le Croy
  43.                                     Satori Software
  44.  
  45.